﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nanoCMS.Core.WebProviders.HtmlHelpers.Pagination {
	public class PagerOptions {
		/// <summary>
		/// Autohide if there is only one page
		/// </summary>
		public bool AutoHide { get; set; }

		/// <summary>
		/// Show first and last link
		/// </summary>
		public bool ShowFirstLast { get; set; }

		/// <summary>
		/// page index parameter name in url
		/// </summary>
		public string PageIndexParameterName { get; set; }

		/// <summary>
		/// Show prev and next link
		/// </summary>
		public bool ShowPrevNext { get; set; }

		/// <summary>
		/// Pager container eg: div
		/// </summary>
		public string PagerContainerTag { get; set; }

		public string FirstText { get; set; }
		public string LastText { get; set; }
		public string PrevText { get; set; }
		public string NextText { get; set; }
		public string CurrentClass { get; set; }


		public IDictionary<string, object> ContainterHtmlAttributes { get; set; }
		
		public IDictionary<string, object> ListHtmlAttributes { get; set; }

		public IDictionary<string, object> ListItemHtmlAttributes { get; set; }

		public IDictionary<string,object> LinkHtmlAttributes { get; set; }


		public PagerOptions()
		{
			AutoHide = true;
			ShowFirstLast = true;
			PageIndexParameterName = "Page";
			PagerContainerTag = "div";
			ShowPrevNext = true;
			ContainterHtmlAttributes = new Dictionary<string, object>();
			ListHtmlAttributes = new Dictionary<string, object>();
			ListItemHtmlAttributes = new Dictionary<string, object>();
			LinkHtmlAttributes = new Dictionary<string, object>();
			CurrentClass = "current";
			FirstText = "First";
			LastText = "Last";
			NextText = "Next";
			PrevText = "Prev";
		}
	}
}
